//
// Created by zhouwd on 2019/6/27.
//

#include "base-thread.h"

void *_BASE_THREAD::start_thread(void *arg) {
    Thread *ptr = (Thread *)arg;
    ptr->run();

    return 0;
}

int _BASE_THREAD::start() {

    if(pthread_create(&pid,NULL,start_thread,(void *)this) != 0)                 //创建一个线程(必须是全局函数)
    {
        return -1;
    }
    return 0;
}

void _BASE_THREAD::stop() {



}
